package org.dromara.wms.domain.bo;

import org.dromara.wms.domain.WmsStock;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 库存数量业务对象 wms_stock
 *
 * @author wenrui Su
 * @date 2024-03-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = WmsStock.class, reverseConvertGenerate = false)
public class WmsStockBo extends BaseEntity {

    /**
     * 事务
     */
    @NotNull(message = "事务不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 物品号
     */
    @NotNull(message = "物品号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productId;

    /**
     * 单位
     */
    @NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String measureUnit;

    /**
     * 批次号
     */
    @NotBlank(message = "批次号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String batchCode;

    /**
     * 仓库
     */
    @NotNull(message = "仓库不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long warehouseId;

    /**
     * 库位
     */
    private Long areaId;

    /**
     * 供应商
     */
    @NotNull(message = "供应商不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long supplierId;

    /**
     * 生产厂商
     */
    private Long manufacturerId;

    /**
     * 在库数量
     */
    @NotNull(message = "在库数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal quantity;

    /**
     * 采购单价
     */
    @NotNull(message = "采购单价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal purchasePrice;

    /**
     * 库存有效期
     */
    @NotNull(message = "库存有效期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date expireDate;

    /**
     * 备注
     */
    private String remark;


}
